The present invention relates to an electronic control unit for a car (hereinafter referred to a "car electric control unit").
Generally, a car electronic control unit is generally designed so as to be controlled by a microcomputer with the advance of its performance. In most cases, a car electronic control unit has such a circuit configuration in which the operation of the microcomputer is watched by a watchdog circuit for the purpose of fail safe at the time of running-away of a program in the microcomputer so that the microcomputer can be reset when the run-away state is detected.
Incidentally, a car electronic control unit generally has a function which stops such a microcomputer (that is, makes the microcomputer sleep) to thereby reduce consumed electric power when the microcomputer is not required to operate. However, if the microcomputer is made to sleep when the runaway state is watched by a built-in watchdog circuit, the electronic control unit resets the microcomputer to start on the basis of misjudgment that the microcomputer has stopped. That is, there arises a problem that the microcomputer starts to increase consumed electric power even in the case where the microcomputer is not required to operate. As a measure to solve such a problem, Japanese Utility Model Publication JP-3-34955(U) entitled "On-vehicle Appliance Control Circuit" proposes a circuit in which an electric source is supplied to a watchdog circuit only in the condition that the microcomputer is required to operate, for example, only when the ignition switch is in the on-state.
FIG. 6 is a functional block diagram showing operating functions of the car electronic control unit. The car electronic control unit has three basic functions as follows:
a seat belt lamp control function which turns a seat belt lamp 2 on/off only when an ignition switch 1 is in an on-state;
a key alarm function which concludes that an ignition key is left behind and sounds an alarm buzzer 5 when an ignition key sensor 4 detects the fact that the ignition key is left as it is inserted in a key cylinder in spite of the fact that the ignition switch 1 is in an off-state and the opened-state of a driver's seat door is detected on the basis of a signal from the door open/close detection sensor 3; and
a room lamp turning-on function which turns-on a room lamp 8 while the door is opened or for several seconds (for example, 5 seconds) after the door is closed on the basis of signals from the door open/close detection sensor 3 and a timer 6 connected to the door open/close detection sensor 3.
In addition to the above three basic functions, it has an additional function as follows.
A watchdog function which watches the operation, such as running-away, etc., of the control portion (microcomputer chip) 7 for controlling the operations of the aforementioned various functions.
In the seat belt lamp control function, the on-state of the ignition switch 1 is detected by a detection portion 11 in the control portion 7 and the seat belt lamp 2 is controlled to be turned on/off on the basis of the result of the detection. Specifically, as shown in FIG. 7, the ignition switch 1 has one end connected to a battery and the other end connected to a connection terminal 12 of the car electronic control unit. The connection terminal 12 is grounded through a resistor R1 in the car electronic control unit and connected to a first input terminal I1 of the control portion 7 through a resistor R2. A first output terminal Q1 of the control portion 7 is connected to the base of an NPN-type first transistor Tr1 through a resistor R3. The emitter of the first transistor Tr1 is grounded, and the collector of the first transistor Tr1 is connected to one end of the seat belt lamp 2 through a connection terminal I3. The other end of the seat belt lamp 2 is connected to the battery. A detection portion 11 in the control portion 7 performs on/off turning of the first transistor Tr1 in accordance with the input state of the first input terminal I1 to control the current in the seat belt lamp 2 to thereby control the turning on/off of the seat belt lamp 2.
In the key alarm function, as shown in FIG. 6, a logical product AND among the off-state of the ignition switch 1, the door opened-state detected by the door open/close detection sensor 3 and the key-presence state detected by the ignition key sensor 4 is detected by an AND circuit 21 to sound an alarm buzzer 5. Specifically, one end of the door open/close detection sensor 3 is grounded, and the other end of the door open/close detection sensor 3 is connected to a connection terminal 22 of the car electronic control unit. The connection terminal 22 is connected to the battery through a resistor R4 and connected to a second input terminal I2 of the control portion 7 through a resistor R5. Further, one end of the ignition key sensor 4 is grounded, and the other end of the ignition key sensor 4 is connected to a connection terminal 23 of the car electronic control unit. The connection terminal 23 is connected to the battery through a resistor R6 and connected to an input terminal I3 of the control portion 7 through a resistor R7. Further, a second output terminal Q2 of the control portion 7 is connected to the alarm buzzer 5. The logical product AND among the off-state of the ignition switch 1, the door opened-state detected by the door open/close detection sensor 3 and the key-presence state detected by the ignition key sensor 4 is detected by the AND circuit 21 in the control portion 7 to thereby control the sounding of the alarm buzzer 5.
In the room lamp turning-on function, as shown in FIG. 6, the timer 6 counts time for several seconds (for example, 5 seconds) after the door open/close detection sensor 3 detects the door closed-state so that the room lamp 8 is turned on while the door open/close detection sensor 3 detects the fact that the door is in the opened-state or while an AND circuit 31 logically detects the fact that the count value of the timer 6 is within the time of several seconds (5 seconds). Specifically, as shown in FIG. 7, a third output terminal Q3 of the control portion 7 is connected to the base of an NPN-type second transistor Tr2 through a resistor R8. The emitter of the second transistor Tr2 is grounded, and the collector of the second transistor Tr2 is connected to one end of the room lamp 8 through a connection terminal 24. The other end of the room lamp 8 is connected to the battery. The AND circuit 31 in the control portion 7 performs on/off turning of the second transistor Tr2 in accordance with the door opened/closed state to control the current in the room lamp 8 to thereby control the turning on/off of the room lamp 8.
In the watchdog function, as shown in FIG. 6, a watchdog circuit 41 is supplied with an electric source so as to operate when the ignition switch 1 is in the on-state. The watchdog circuit 41 receives a watchdog clear signal from a connection terminal WDO for reporting the internal operating state of the control portion 7, so that the watchdog circuit 41 watches the operation of the control portion 7 on the basis of the watchdog clear signal. When the operation of the control portion 7 gets into an abnormal state such as running-away, etc., the watchdog circuit 41 sends a reset signal to a reset terminal RST of the control portion 7. Specifically, as shown in FIG. 7, the watchdog circuit 41 is connected to a PNP-type transistor 43 (switching element) for switching the supply of a source current from an electric source (regulator) 42. The base of the transistor 43 is connected to an NPN-type transistor 44 the connection of which to the ground is switched on/off on the basis of the on/off state of the ignition switch 1.
FIG. 8 is a timing chart showing operations of respective parts. In the car electronic control unit, when the ignition switch 1 is in an off-state in the waveform (A) in FIG. 8, the transistor 44 in FIG. 7 is in an off-state. Accordingly, the base of the transistor 43 becomes high as shown in the waveform (D) in FIG. 8, so that the transistor 43 is kept in the off-state. As a result, the watchdog circuit 41 is at a standstill because the electric source from the regulator 42 is not supplied to the watchdog circuit 41. Further, the control portion 7 is kept in the sleep state to avoid wasteful battery consumption.
When the ignition switch 1 is turned on (at time t1) in the waveform (A) in FIG. 8, the transistor 44 is turned on so that the base of the transistor 43 is bypassed to the ground side so as to become low as shown in the waveform (D) in FIG. 8. As a result, the transistor 43 is turned on, so that the electric source from the regulator 42 is supplied to the watchdog circuit 41. In this occasion, the watchdog circuit 41 sends a reset signal to the reset terminal RST of the control portion 7 to release the sleep state of the control portion 7 (to wake up the control portion 7) as shown in the waveform (G) in FIG. 8. At the same time, the watchdog circuit 41 starts a watchdog operation as shown in the waveform (E) in FIG. 8, so that the watchdog circuit 41 receives a watchdog clear signal as shown in the waveform (F) in FIG. 8 from the connection terminal WDO of the control portion 7 and watches the operation of the control portion 7 on the basis of the signal.
When, for example, a vehicle door is opened and the door opened-state is detected by the door open/close detection sensor 3 at time t2 (the waveform (B) in FIG. 8), the AND circuit 31 of the control portion 7 logically detects the door opened-state and turns on the room lamp 8 (the waveform (C) in FIG. 8).
Although it is a matter of course that the control portion 7 operates when the ignition switch 1 is in the on-state, the operation of the control portion 7 is not always stopped even in the case where the ignition switch 1 is turned off as will be described later. In this case, the watching function of the watchdog circuit 41 in the conventional car electronic control unit does not work when the ignition switch 1 is in an off-state. Accordingly, there arises a problem in a function, such as a timer function, etc., necessary for operating the microcomputer in the off-state of the ignition switch 1, such that running-away cannot be watched while the timer operates.
Specifically, when the ignition switch 1 is turned off as shown in the waveform (A) in FIG. 8 at time t3 in FIG. 8, the transistor 44 in FIG. 7 is turned off. Accordingly, the base of the transistor 43 becomes high as shown in the waveform (D) in FIG. 8, so that the transistor 43 is turned off. As a result, the electric source from the regulator 42 is not supplied to the watchdog circuit 41, so that the watchdog circuit 41 stops its watchdog operation (the waveform (E) in FIG. 8).
However, when the vehicle door is still opened after the time t3, the door opened-state is detected by the door open/close detection sensor 3 (the waveform (B) in FIG. 8). The timer 6 counts several seconds (5 seconds: T.alpha. in the waveform (C) in FIG. 8) after the door open/close detection sensor 3 detects the door closed-state. The room lamp 8 must be in the on-state continuously unless the counting is completed. For this reason, the operation of the control portion 7 is continued even after the time t3 as shown in the waveform (G) in FIG. 8, so that the control portion 7 intends to give a watchdog clear signal, as shown in the waveform (F) in FIG. 8, to the watchdog circuit 41 through the connection terminal WDO.
However, because the watchdog operation of the watchdog circuit 41 has stopped at the time t3 as described above (the waveform (E) in FIG. 8), the watchdog circuit 41 cannot watch the control portion 7 in the period T.beta. between the time t3 and the time t4 even in the case where the watchdog circuit 41 receives the watchdog clear signal as shown in the waveform (F) in FIG. 8.